<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/*
 * C_Users_List
 *
 * 用户列表功能实现类
 *
 */

class C_Users_List extends MY_Controller {
   
    public function __construct() {
        parent::__construct();
        $this->load->model('System_Model');
        $this->load->model('Users_Model');
    }

    public function index() {
        $data['title'] = $this->System_Model->get_system('login_title');
        //获取列表,状态为有效
        $data['listView'] = $this->Users_Model->get_users(OBJ_STATE_VALID);
        
        $this->load->view('layout/header', $data);
        $this->load->view('layout/menu');
        $this->load->view('users/user_list_view', $data);
        $this->load->view('layout/footer');
    }
    
        
    //删除
    function delete($id = FALSE) {
        $data = array(
            'u_state' => OBJ_STATE_INVALID
        );
        $this->Users_Model->UpdateEntity($id,$data);
        redirect('users/C_Users_List');
    }

}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */